<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.2.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"he7009.gitee.io","root":"/","scheme":"Mist","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},"path":"search.xml"};
  </script>

  <meta name="description" content="命令行中配置选项 命令行中配置选项分为长形式和短形式方式。例如： # 配置默认的存储引擎-长形式 mysql&gt; mysqld --default-storage-engine&#x3D;MyISAM  # 链接数据库-短形式 mysql&gt; mysql -h127.0.0.1 -uroot -p 长形式--启动选项1[&#x3D;值1] --启动选项2[&#x3D;值2] ... --启动选项n[&#x3D;值n]  # 例如： mysq">
<meta property="og:type" content="article">
<meta property="og:title" content="Mysql 配置、启动、系统变量">
<meta property="og:url" content="https://he7009.gitee.io/2021/03/11/mysql/mysql-pei-zhi-qi-dong-xi-tong-bian-liang/index.html">
<meta property="og:site_name" content="he7009">
<meta property="og:description" content="命令行中配置选项 命令行中配置选项分为长形式和短形式方式。例如： # 配置默认的存储引擎-长形式 mysql&gt; mysqld --default-storage-engine&#x3D;MyISAM  # 链接数据库-短形式 mysql&gt; mysql -h127.0.0.1 -uroot -p 长形式--启动选项1[&#x3D;值1] --启动选项2[&#x3D;值2] ... --启动选项n[&#x3D;值n]  # 例如： mysq">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2021-03-11T08:23:10.000Z">
<meta property="article:modified_time" content="2021-03-13T08:27:25.747Z">
<meta property="article:author" content="he7009">
<meta property="article:tag" content="mysql">
<meta name="twitter:card" content="summary">

<link rel="canonical" href="https://he7009.gitee.io/2021/03/11/mysql/mysql-pei-zhi-qi-dong-xi-tong-bian-liang/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>Mysql 配置、启动、系统变量 | he7009</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

<link rel="alternate" href="/atom.xml" title="he7009" type="application/atom+xml">
</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">he7009</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
      <p class="site-subtitle" itemprop="description">天行健，君子以自强不息</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="fa fa-tag fa-fw"></i>标签</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>

  </li>
        <li class="menu-item menu-item-about">

    <a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于</a>

  </li>
        <li class="menu-item menu-item-commonweal">

    <a href="/404/" rel="section"><i class="fa fa-heartbeat fa-fw"></i>公益 404</a>

  </li>
  </ul>
</nav>




</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://he7009.gitee.io/2021/03/11/mysql/mysql-pei-zhi-qi-dong-xi-tong-bian-liang/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="he7009">
      <meta itemprop="description" content="Go、PHP、Mysql、Redis、Linux、Shell、Nginx—知识分享">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="he7009">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          Mysql 配置、启动、系统变量
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2021-03-11 16:23:10" itemprop="dateCreated datePublished" datetime="2021-03-11T16:23:10+08:00">2021-03-11</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2021-03-13 16:27:25" itemprop="dateModified" datetime="2021-03-13T16:27:25+08:00">2021-03-13</time>
              </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/Mysql/" itemprop="url" rel="index"><span itemprop="name">Mysql</span></a>
                </span>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <h2 id="命令行中配置选项"><a href="#命令行中配置选项" class="headerlink" title="命令行中配置选项"></a>命令行中配置选项</h2><hr>
<p>命令行中配置选项分为长形式和短形式方式。例如：</p>
<pre class="line-numbers language-sql" data-language="sql"><code class="language-sql"><span class="token comment"># 配置默认的存储引擎-长形式</span>
mysql<span class="token operator">></span> mysqld <span class="token comment">--default-storage-engine=MyISAM</span>

<span class="token comment"># 链接数据库-短形式</span>
mysql<span class="token operator">></span> mysql <span class="token operator">-</span>h127<span class="token punctuation">.</span><span class="token number">0.0</span><span class="token number">.1</span> <span class="token operator">-</span>uroot <span class="token operator">-</span>p<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span></span></code></pre>
<h3 id="长形式"><a href="#长形式" class="headerlink" title="长形式"></a>长形式</h3><pre class="line-numbers language-sql" data-language="sql"><code class="language-sql"><span class="token comment">--启动选项1[=值1] --启动选项2[=值2] ... --启动选项n[=值n]</span>

<span class="token comment"># 例如：</span>
mysql<span class="token operator">></span> mysqld <span class="token comment">--default-storage-engine=MyISAM</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span></span></code></pre>

<ol>
<li>选项名前加上<code>--</code>前缀</li>
<li>如果选项名是由多个单词构成的，它们之间可以由短划线<code>-</code>连接起来，也可以使用下划线<code>_</code>连接起来</li>
<li>选项名、=、选项值之间不可以有空白字符</li>
</ol>
<h3 id="短形式"><a href="#短形式" class="headerlink" title="短形式"></a>短形式</h3><pre class="line-numbers language-sql" data-language="sql"><code class="language-sql"><span class="token operator">-</span>启动选项<span class="token number">1</span><span class="token punctuation">[</span>空格<span class="token punctuation">]</span><span class="token punctuation">[</span>值<span class="token number">1</span><span class="token punctuation">]</span> <span class="token operator">-</span>启动选项<span class="token number">2</span><span class="token punctuation">[</span>空格<span class="token punctuation">]</span><span class="token punctuation">[</span>值<span class="token number">2</span><span class="token punctuation">]</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span> <span class="token operator">-</span>启动选项n<span class="token punctuation">[</span>空格<span class="token punctuation">]</span><span class="token punctuation">[</span>值n<span class="token punctuation">]</span>

<span class="token comment"># 例如：</span>
mysql<span class="token operator">></span> mysql <span class="token operator">-</span>h127<span class="token punctuation">.</span><span class="token number">0.0</span><span class="token number">.1</span> <span class="token operator">-</span>uroot <span class="token operator">-</span>p<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span></span></code></pre>

<ol>
<li>短形式的选项名只有一个字母，选项名前只加一个短划线<code>-</code>前缀</li>
<li>选项名和选项值之间可以没有间隙，或者用空白字符隔开</li>
<li><code>-p</code>选项有些特殊，<code>-p</code>和密码值之间不能有空白字符</li>
</ol>
<h2 id="配置文件中配置选项"><a href="#配置文件中配置选项" class="headerlink" title="配置文件中配置选项"></a>配置文件中配置选项</h2><hr>
<h3 id="配置选项"><a href="#配置选项" class="headerlink" title="配置选项"></a>配置选项</h3><p>与在命令行中指定启动选项不同的是，配置文件中的启动选项被划分为若干个组，每个组有一个组名，用中括号<code>[]</code>扩起来，像这样：</p>
<pre class="line-numbers language-sql" data-language="sql"><code class="language-sql"><span class="token punctuation">[</span>server<span class="token punctuation">]</span>
option1     					<span class="token comment">#这是option1，该选项不需要选项值</span>
option2 <span class="token operator">=</span> value2      <span class="token comment">#这是option2，该选项需要选项值</span>
<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>

<span class="token punctuation">[</span>mysqld<span class="token punctuation">]</span>
<span class="token punctuation">(</span>具体的启动选项<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">)</span>

<span class="token punctuation">[</span>mysqld_safe<span class="token punctuation">]</span>
<span class="token punctuation">(</span>具体的启动选项<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">)</span>

<span class="token punctuation">[</span>client<span class="token punctuation">]</span>
<span class="token punctuation">(</span>具体的启动选项<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">)</span>

<span class="token punctuation">[</span>mysql<span class="token punctuation">]</span>
<span class="token punctuation">(</span>具体的启动选项<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">)</span>

<span class="token punctuation">[</span>mysqladmin<span class="token punctuation">]</span>
<span class="token punctuation">(</span>具体的启动选项<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">)</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>

<ol>
<li>配置文件中只能使用长形式的选项</li>
<li>定的启动选项不允许加<code>--</code>前缀，并且每行只指定一个选项</li>
<li><code>=</code>周围可以有空白字符</li>
<li>使用<code>#</code>来添加注释，从<code>#</code>出现直到行尾的内容都属于注释内容，读取配置文件时会忽略这些注释内容</li>
</ol>
<h3 id="加载配置选项"><a href="#加载配置选项" class="headerlink" title="加载配置选项"></a>加载配置选项</h3><p>配置文件中不同的选项组是给不同的启动命令使用的，如果选项组名称与程序名称相同，则组中的选项将专门应用于该程序。有两个选项组比较特别：</p>
<ul>
<li><p><code>[server]</code>组下边的启动选项将作用于所有的服务器程序。</p>
</li>
<li><p><code>[client]</code>组下边的启动选项将作用于所有的客户端程序。</p>
</li>
</ul>
<p>需要注意的一点是，<code>mysqld_safe</code>和<code>mysql.server</code>这两个程序在启动时都会读取<code>[mysqld]</code>选项组中的内容。读取如下：</p>
<table>
<thead>
<tr>
<th>启动命令</th>
<th>类别</th>
<th>能读取的组</th>
</tr>
</thead>
<tbody><tr>
<td>mysqld</td>
<td>启动服务器</td>
<td><code>[mysqld]</code>、<code>[server]</code></td>
</tr>
<tr>
<td>mysqld_safe</td>
<td>启动服务器</td>
<td><code>[mysqld]</code>、<code>[server]</code>、<code>[mysqld_safe]</code></td>
</tr>
<tr>
<td>mysql.server</td>
<td>启动服务器</td>
<td><code>[mysqld]</code>、<code>[server]</code>、<code>[mysqld_safe]</code></td>
</tr>
<tr>
<td>mysql</td>
<td>启动客户端</td>
<td><code>[mysql]</code>、<code>[client]</code></td>
</tr>
<tr>
<td>mysqladmin</td>
<td>启动客户端</td>
<td><code>[mysqladmin]</code>、<code>[client]</code></td>
</tr>
<tr>
<td>mysqldump</td>
<td>启动客户端</td>
<td><code>[mysqldump]</code>、<code>[client]</code></td>
</tr>
</tbody></table>
<h2 id="系统变量"><a href="#系统变量" class="headerlink" title="系统变量"></a>系统变量</h2><hr>
<h3 id="系统变量作用范围"><a href="#系统变量作用范围" class="headerlink" title="系统变量作用范围"></a>系统变量作用范围</h3><ul>
<li><p><code>GLOBAL</code>：全局变量，影响服务器的整体操作。</p>
</li>
<li><p><code>SESSION</code>：会话变量，影响某个客户端连接的操作。（注：<code>SESSION</code>有个别名叫<code>LOCAL</code>）</p>
</li>
</ul>
<h3 id="查看系统变量"><a href="#查看系统变量" class="headerlink" title="查看系统变量"></a>查看系统变量</h3><pre class="line-numbers language-sql" data-language="sql"><code class="language-sql">mysql<span class="token operator">></span> <span class="token keyword">SHOW</span> <span class="token punctuation">[</span><span class="token keyword">GLOBAL</span><span class="token operator">|</span><span class="token keyword">SESSION</span><span class="token punctuation">]</span> VARIABLES <span class="token punctuation">[</span><span class="token operator">LIKE</span> 匹配的模式<span class="token punctuation">]</span><span class="token punctuation">;</span><span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
<h3 id="设置系统变量"><a href="#设置系统变量" class="headerlink" title="设置系统变量"></a>设置系统变量</h3><pre class="line-numbers language-sql" data-language="sql"><code class="language-sql"><span class="token keyword">SET</span> <span class="token punctuation">[</span><span class="token keyword">GLOBAL</span><span class="token operator">|</span><span class="token keyword">SESSION</span><span class="token punctuation">]</span> 系统变量名 <span class="token operator">=</span> 值<span class="token punctuation">;</span>
<span class="token comment"># 或者</span>
<span class="token keyword">SET</span> <span class="token punctuation">[</span>@@<span class="token punctuation">(</span><span class="token keyword">GLOBAL</span><span class="token operator">|</span><span class="token keyword">SESSION</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token punctuation">]</span>var_name <span class="token operator">=</span> XXX<span class="token punctuation">;</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span></span></code></pre>


<h2 id="状态变量"><a href="#状态变量" class="headerlink" title="状态变量"></a>状态变量</h2><hr>
<p>为了让我们更好的了解服务器程序的运行情况，<code>MySQL</code>服务器程序中维护了好多关于程序运行状态的变量，它们被称为<code>状态变量</code>。比方说<code>Threads_connected</code>表示当前有多少客户端与服务器建立了连接。</p>
<p>查看状态变量：</p>
<pre class="line-numbers language-sql" data-language="sql"><code class="language-sql"><span class="token keyword">SHOW</span> <span class="token punctuation">[</span><span class="token keyword">GLOBAL</span><span class="token operator">|</span><span class="token keyword">SESSION</span><span class="token punctuation">]</span> <span class="token keyword">STATUS</span> <span class="token punctuation">[</span><span class="token operator">LIKE</span> 匹配的模式<span class="token punctuation">]</span><span class="token punctuation">;</span>

<span class="token comment"># 例如：</span>
<span class="token keyword">SHOW</span> <span class="token keyword">STATUS</span> <span class="token operator">LIKE</span> <span class="token string">'thread%'</span><span class="token punctuation">;</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span></span></code></pre>

    </div>

    
    
    

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/mysql/" rel="tag"># mysql</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/2021/03/05/mysql/mysql-yong-hu-quan-xian-guan-li/" rel="prev" title="Mysql 用户、权限管理">
      <i class="fa fa-chevron-left"></i> Mysql 用户、权限管理
    </a></div>
      <div class="post-nav-item">
    <a href="/2021/03/27/docker/docker-image-chang-yong-ming-ling/" rel="next" title="Docker-image 常用命令">
      Docker-image 常用命令 <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%91%BD%E4%BB%A4%E8%A1%8C%E4%B8%AD%E9%85%8D%E7%BD%AE%E9%80%89%E9%A1%B9"><span class="nav-number">1.</span> <span class="nav-text">命令行中配置选项</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E9%95%BF%E5%BD%A2%E5%BC%8F"><span class="nav-number">1.1.</span> <span class="nav-text">长形式</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E7%9F%AD%E5%BD%A2%E5%BC%8F"><span class="nav-number">1.2.</span> <span class="nav-text">短形式</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E4%B8%AD%E9%85%8D%E7%BD%AE%E9%80%89%E9%A1%B9"><span class="nav-number">2.</span> <span class="nav-text">配置文件中配置选项</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E9%85%8D%E7%BD%AE%E9%80%89%E9%A1%B9"><span class="nav-number">2.1.</span> <span class="nav-text">配置选项</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%8A%A0%E8%BD%BD%E9%85%8D%E7%BD%AE%E9%80%89%E9%A1%B9"><span class="nav-number">2.2.</span> <span class="nav-text">加载配置选项</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E7%B3%BB%E7%BB%9F%E5%8F%98%E9%87%8F"><span class="nav-number">3.</span> <span class="nav-text">系统变量</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E7%B3%BB%E7%BB%9F%E5%8F%98%E9%87%8F%E4%BD%9C%E7%94%A8%E8%8C%83%E5%9B%B4"><span class="nav-number">3.1.</span> <span class="nav-text">系统变量作用范围</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E6%9F%A5%E7%9C%8B%E7%B3%BB%E7%BB%9F%E5%8F%98%E9%87%8F"><span class="nav-number">3.2.</span> <span class="nav-text">查看系统变量</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E8%AE%BE%E7%BD%AE%E7%B3%BB%E7%BB%9F%E5%8F%98%E9%87%8F"><span class="nav-number">3.3.</span> <span class="nav-text">设置系统变量</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E7%8A%B6%E6%80%81%E5%8F%98%E9%87%8F"><span class="nav-number">4.</span> <span class="nav-text">状态变量</span></a></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
  <p class="site-author-name" itemprop="name">he7009</p>
  <div class="site-description" itemprop="description">Go、PHP、Mysql、Redis、Linux、Shell、Nginx—知识分享</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">9</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">4</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
          
        <span class="site-state-item-count">12</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2021</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">he7009</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://mist.theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Mist</a> 强力驱动
  </div>

        








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/muse.js"></script>


<script src="/js/next-boot.js"></script>




  















  

  

</body>
</html>
